<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class RenameGuildAccountDailyTable extends Migration
{
    protected $connection = 'guild';
    
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('guild_account_daily', function (Blueprint $table) {
            $table->renameColumn('total_income', 'total_turnover')->change();
            $table->renameColumn('voice_income', 'voice_turnover')->change();
            $table->renameColumn('video_income', 'video_turnover')->change();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('guild_account_daily', function (Blueprint $table) {
            //
        });
    }
}
